﻿(function($){
    CharacteristicItem = function(data){
        return {
            fill:function(){
                var table = data.Table;
                for(var i=0;i<table.length;i++){
                    var departId = table[i].depart_id;
                    var charactId = table[i].ID;
                    var title = table[i].Title;
                    var td =  $("tr[departId='{0}']".format(departId)).children().eq(7);
                    var size = td.find("div").size();
                    var n = 1;
                    if(size > 0){
                        n = td.find("div:last span").html();
                        n = ~~n;
                        n ++;
                    } else {
                        td.html("");
                    }
                    console.log(td.height());
                    $("tr[departId='{0}'] .separater".format(departId)).css("height",td.height() - 10);
                    td.append("<div><span>{3}</span>、<a href='../ZP/YxsbDetail.aspx?departid={0}&id={1}&type=3'>{2}</a></div>".format(departId, charactId,title, n));
                }
            }
        }     
    }

})($);